import { EntitySchema } from '@mikro-orm/core';

export class TypechoPaylog {
  pid!: number;
  subject?: string;
  totalAmount?: string;
  outTradeNo?: string;
  tradeNo?: string;
  paytype?: string;
  uid?: number = -1;
  created?: number;
  status?: number = 0;
}

export const TypechoPaylogSchema = new EntitySchema({
  class: TypechoPaylog,
  properties: {
    pid: { primary: true, type: 'number' },
    subject: { type: 'string', length: 255, nullable: true },
    totalAmount: { type: 'string', length: 255, nullable: true },
    outTradeNo: { type: 'string', length: 255, nullable: true },
    tradeNo: { type: 'string', length: 255, nullable: true },
    paytype: { type: 'string', length: 255, nullable: true },
    uid: { type: 'number', nullable: true, default: -1 },
    created: { type: 'number', nullable: true },
    status: { type: 'number', nullable: true, default: 0 },
  },
});
